package xyz.luhui1hao.sell.mapper;

import org.springframework.stereotype.Repository;
import xyz.luhui1hao.sell.domain.OrderMaster;

import java.util.List;

/**
 * @InterfaceName OrderMasterMapper
 * @Description TODO
 * @Author luhui1hao
 * @Date 2018/8/21 下午3:01
 * @Version 1.0
 */
@Repository
public interface OrderMasterMapper {

    /**
     * 根据orderId查找订单
     * @param orderId
     * @return
     */
    OrderMaster findByOrderId(String orderId);

    /**
     * 根据买家openid查找订单
     * @param buyerOpenId
     * @return
     */
    List<OrderMaster> findByBuyerOpenId(String buyerOpenId);

    /**
     * 插入订单
     * @param orderMaster
     * @return
     */
    int insertOrderMaster(OrderMaster orderMaster);

    /**
     * 更新订单
     * @param orderMaster
     * @return
     */
    int updateOrderMaster(OrderMaster orderMaster);
}
